package com.yupi.springbootinit.model.dto.production.printingrecord;

import jakarta.validation.constraints.*;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class PrintingRecordUpdateRequest {

    /**
     * 记录ID（必填）
     */
    @NotNull(message = "记录ID不能为空")
    private Long id;

    /**
     * 流程卡号
     */
    private String recordNo;

    /**
     * 产品名称
     */
    @NotBlank(message = "产品名称不能为空")
    private String productName;

    private String processSheetNo;

    private String deviceName;

    @NotNull
    private LocalDateTime startTime;

    private LocalDateTime endTime;

    @Min(0)
    @Max(7 * 24 * 60)
    private Integer durationMinutes;

    @NotNull
    @Min(0)
    private Integer printQty;

    private String materialBrand;
    private String supplierName;
    private String materialLot;
    @Digits(integer = 10, fraction = 2)
    private BigDecimal flowRateValue;

    private String flowRateUnit;

    @NotNull
    @Digits(integer = 12, fraction = 3)
    private BigDecimal inputGrams;

    @NotNull
    @Digits(integer = 12, fraction = 3)
    private BigDecimal cleanoutGrams;

    @NotNull
    @Digits(integer = 12, fraction = 3)
    private BigDecimal fanPowderGrams;

    @Digits(integer = 12, fraction = 3)
    private BigDecimal baseWeightBeforeGrams;

    @Digits(integer = 12, fraction = 3)
    private BigDecimal baseWeightAfterGrams;

    @NotNull
    @Min(0)
    private Integer scrapQty;

    @NotNull
    @Digits(integer = 12, fraction = 3)
    private BigDecimal scrapWeightGrams;

    private Long unloadOperatorId;
    private String unloadOperatorName;

    private String remark;
}